package com.nf.ch03.test05.demo02;

/**
 * @author lwj
 * @date 2025-03-03
 * @vesion 1.0.0
 */
public class Instrument {
    /**
     * 名称
     */
    private String name;
    /**
     * 音色
     */
    private String timbre;

    // 构造方法
    public Instrument() {}

    public Instrument(String name, String timbre) {
        this.name = name;
        this.timbre = timbre;
    }

    public void yanZo(){
        System.out.println(this.timbre);
    }

    // 属性
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTimbre() {
        return timbre;
    }

    public void setTimbre(String timbre) {
        this.timbre = timbre;
    }
}
